﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Imports MySql.Data.MySqlClient
Imports Utilerias
Public Class ImpFederalesFact
    Public Shared Function Build(ByVal dr As MySqlDataReader) As ImpFederalesBE
        Dim tmpImpFederales As ImpFederalesBE = New ImpFederalesBE()
        Try
            With tmpImpFederales
                '.IdImpuestos = convertDTFromDb.convertInt32(dr.Item("IdImpuestos"))
                .IVATrasladadoTasa = convertDTFromDb.ConvertDecimal(dr.Item("IVATrasTasa"))
                .ActivarIVATasaCero = Conversiones.convertSNToBool(convertDTFromDb.ConvertString(dr.Item("ActIVACero")))
                .ActivarIVAExento = Conversiones.convertSNToBool(convertDTFromDb.ConvertString(dr.Item("ActIVAExento")))
                .AplicarIVARetenido = Conversiones.convertSNToBool(convertDTFromDb.ConvertString(dr.Item("IVARetAplica")))
                .IVARetenidoTasa = convertDTFromDb.ConvertDecimal(dr.Item("IVARetTasa"))
                .AplicarIEPS = Conversiones.convertSNToBool(convertDTFromDb.ConvertString(dr.Item("IEPSAplica")))
                .IEPSTasa = convertDTFromDb.ConvertDecimal(dr.Item("IEPSTasa"))
                .AplicarISR = Conversiones.convertSNToBool(convertDTFromDb.ConvertString(dr.Item("ISRAplica")))
                .ISRTasa = convertDTFromDb.ConvertDecimal(dr.Item("ISRTasa"))
            End With
            Return tmpImpFederales
        Catch ex As Exception
            Throw
        Finally
            tmpImpFederales = Nothing
        End Try
    End Function
End Class
